<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login Page</title>

<script type="text/javascript">
		function validateForm() {
			var username=document.forms["loginForm"]["username"].value;
			var password=document.forms["loginForm"]["password"].value;
			if (username==null || username=="") {
				document.getElementById("errmsg").innerHTML="username required";
				return false;
			}
			else if(password==null || password=="") {
				document.getElementById("errmsg").innerHTML="password required";
				return false;
			}
			return true;
		}
	</script>
</head>

<body>
<div id="login" style="width: 300px; height: 200px; margin:auto; clear: both;">
	<s:actionerror />
	<p id="errmsg"></p>
	<s:form name="loginForm" action="loginSubmit.action" onsubmit="return validateForm()" method="post">
		<s:textfield name="username" key="label.username" size="20" />
		<s:password name="password" key="label.password" size="20" />
		<s:submit method="execute" key="label.login" align="center" />
	</s:form>
	<s:a href="/forgotPassword.tiles">Reset Password</s:a>
</div>
</body>
</html>